package main

import (
	"net/http"

	"github.com/prometheus/client_golang/prometheus/promhttp"

	"aicloud.cn/aicloud-operate/pkg/bootstrap"
	"aicloud.cn/aicloud-operate/pkg/db"
	"aicloud.cn/aicloud-operate/pkg/util"
)

func main() {
	defer func() {
		db.DbClient.Close()
	}()
	go func() {
		http.Handle("/metrics", promhttp.Handler())
		util.GetLogger().Fatalf("prometheus Http Server failed %s", http.ListenAndServe(":8899", nil))
	}()
	// 配置加载,启动服务
	bootstrap.Bootstrap()
}
